<?php
/*
VERSION: pre-alpha 1
Well, hello there, and welcome to BLAWGGERpre-alpha... the code's pretty messed up, but (hopefully) I'll get
around to fixing it up one day... err, yeah. Theme's based off K2 for WordPress so it looks pretty nice ^_^
Have fun ^_^
-a2h
http://a2h.uni.cc/

*****************************************

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

# BLOG CONFIG
$blogwtitle="BLAWGGER"; // the title of your blog that will be displayed in the WINDOW TITLEBAR
$blogftitle="BLAWGGER<sub>pre-alpha</sub>"; // the title of your blog that will be displayed at the TOP OF THE PAGE
$blogstitle="default"; // the subtitle of your blog, displayed below the title at the top of the page (for the default one just change it to "default" w/o the quotes)

# MYSQL CONFIG
$sdbserver="localhost"; // the server location. localhost works most of the time.
$dbuser="username"; // the username that has access to the database below. some servers prefix it with your site admin username.
$dbpass="password"; // the password of the username above
$database="blawgger"; // the name of the database some servers prefix it with your site admin username.
// KEEP THE FOLLOWING LINE THE SAME UNLESS YOU KNOW WHAT YOU'RE DOING!
$prefix="blawgger_"; // the prefix for all the tables. useful for having multiple pieces of software using the same database.

# ADMIN CONFIG
$adminuser="admin"; // the username you will use to administrate the blog.
$adminpass="admin"; // the password to the above username.

$con=mysql_connect($dbserver,$dbuser,$dvpass);
if (!$con) { die("Unable to connect to MySQL: ".mysql_error()); }

mysql_select_db($database,$con);

/*
Database layout:
	tags:
		columns: tagid (integer), tagname (string)
	blogs:
		columns, id (integer), tag (integer), name (string), content (string), posted (datetime)
*/

$currentpage="home";
switch ($_GET["action"])
{
	case "login": $currentpage="admin"; break;
	case "admin": $currentpage="admin"; break;
	case "addblog": $currentpage="admin"; break;
	default: $currentpage="home"; break;
}

template_page_header();

switch($_GET["action"])
{
case "login":
	echo '
	<div id="post-1" class="post"><h3 class="entry-title">Login</h3>
		<form action="?action=admin" method="post">
			Enter your username: <input type="text" name="uname" /><br />
			Enter your password: <input type="password" name="upass" /><br />
			<input type="submit" value="Login" />
		</form>
	</div>';
	break;
case "admin":
	if (($_POST["uname"]==$adminuser and $_POST["upass"]==$adminpass) or (base64_decode($_POST["uname"])==$adminuser and base64_decode($_POST["upass"])==$adminpass)) {
		echo '
		<div id="post-1" class="post">
		<h3 class="entry-title">Welcome</h3>
			Hi there, and welcome to the BLAWGGER administration panel. It\'s very small, but it does the job :). To logout, just leave the page. Oh, and since K2 has lots of Ajax I\'ll be seeing if I can implement Ajax to make this panel nicer =D<br />
		</div>
			<br />
		<div id="post-2" class="post">
			<h3 class="entry-title">Blog manager</h3>
				<h4><small><small><small>Add new blog</small></small></small></h4>
					<form action="?action=addblog" method="post">
						Enter tag id number: <input type="text" name="tagid" /> (i\'ll do a drop down box later)<br />
						Enter blog name: <input type="text" name="blogname" maxlength="24" /><br />
						<textarea rows="20" cols="50" name="blogcontent"></textarea><br />
						
						<input type="hidden" name="uname" value="'.base64_encode($_POST["uname"]).'" />
						<input type="hidden" name="upass" value="'.base64_encode($_POST["upass"]).'" />
						
						<input type="submit" value="Post" />
					</form>
					<br />
				
				<h4><small><small><small>Edit a blog</small></small></small></h4>
					Not added yet. Use phpMyAdmin for now.
					<br />
		
				<h4><small><small><small>Delete a blog</small></small></small></h4>
					Not added yet. Use phpMyAdmin for now.
					<br />
		</div>
			<br />
		<div id="post-3" class="post">
			<h3 class="entry-title">Tag manager</h3>
				<h4><small><small><small>Add new tag</small></small></small></h4>
					<form action="?action=addtag" method="post">
						Enter tag name: <input type="text" name="tagname" maxlength="24" />
						<input type="hidden" name="uname" value="'.base64_encode($_POST["uname"]).'" />
						<input type="hidden" name="upass" value="'.base64_encode($_POST["upass"]).'" />
						<input type="submit" value="Add" />
					</form>
				<h4><small><small><small>Edit a tag</small></small></small></h4>
					Not added yet. Use phpMyAdmin for now.
					<br />
		
				<h4><small><small><small>Delete a tag</small></small></small></h4>
					Not added yet. Use phpMyAdmin for now.
					<br />
		</div>';
	} else { template_incorrect_login(); }
	break;
case "addblog":
	if (base64_decode($_POST["uname"])==$adminuser and base64_decode($_POST["upass"])==$adminpass) {
		echo 'Adding blog...<br /><br />';
		
		// get _POST variables into normal variables to save space and to escape the apostrophes.
		$tagid=$_POST["tagid"];
		$blogname=mysql_real_escape_string($_POST["blogname"]);
		$blogcontent=mysql_real_escape_string($_POST["blogcontent"]);
		
		if (mysql_query("INSERT INTO ".$prefix."blogs (tag, name, content, posted) ".
		"VALUES(".$tagid.", '".$blogname."', '".$blogcontent."', NOW())"))
			echo 'Success! ^_^';
		else
			echo 'Onoez.<br />'.mysql_error();
			
		template_admin_back();
	} else { template_incorrect_login(); }
	break;
case "addtag":
	if (base64_decode($_POST["uname"])==$adminuser and base64_decode($_POST["upass"])==$adminpass) {
		echo 'Adding tag...<br /><br />';
		
		$tagname=mysql_real_escape_string($_POST["tagname"]);

		if (mysql_query("INSERT INTO ".$prefix."tags (tagname) VALUES('".$tagname."')")) {
			echo 'Success! ^_^';
		} else {
			echo 'Onoez.<br />'.mysql_error();
		}
		
		template_admin_back();
	} else { template_incorrect_login(); }
	break;
default:
	// Uncomment line to see the query that gets run
	
	$resulttwo = mysql_query("SELECT ".$prefix."blogs.*, ".$prefix."tags.*,".
				 " DATE_FORMAT(".$prefix."blogs.posted, '%e %M %y') as posteddate".
				 " FROM ".
				 $prefix."blogs".", ".$prefix."tags".
				 " WHERE ".$prefix."blogs.tag = ".$prefix."tags.tagid".
				 " ORDER BY id DESC");
	$postnum=0;

	while($rowtwo = mysql_fetch_array($resulttwo))
	{
		
		echo '
		<div id="post-'.$rowtwo['id'].'" class="post">
			<div class="entry-head">
				<h3 class="entry-title">
					<a href="?action=viewblog&amp;id='.$rowtwo['id'].'" rel="bookmark" title=\'Permanent Link to "'.$rowtwo['name'].'"\'>
						'.$rowtwo['name'].'
					</a>
				</h3>

				<div class="entry-meta">
					<div style="float:left;">
						<script type="text/javascript">
							<!--
								icon_time();
							//-->
						</script>
					</div>
					
					<div style="float:left;">
					<span class="meta-start">Published</span>
					<div class="entry-date">
						<abbr class="published" title="">'.$rowtwo['posteddate'].'</abbr>
					</div>
					<div class="entry-categories"><span class="meta-prep">in</span> <a href="?action=viewtag&amp;id='.$rowtwo['tagid'].'" title="View all posts in '.$rowtwo['tagname'].'">'.$rowtwo['tagname'].'</a></div><span class="meta-end">.</span>
					</div>
					
					<div style="float:left;">
							<script type="text/javascript">
							<!--
								icon_comment();
							//-->
						</script>
					</div>
					
					<div style="float:left;">
					<a href="?action=viewblog&amp;id='.$rowtwo['id'].'" class="commentslink" title="Comment on '.$rowtwo['name'].'">? <span>Comments</span></a>
					</div>
					
					<div class="clear">&nbsp;</div>
					
									</div>
			</div>

			<div class="entry-content">';
				$bcontent=str_replace("\n","<br />",$rowtwo['content']);
				$bcontent=str_replace('\"','"',$bcontent);
				echo $bcontent;
			echo '</div>

		</div>
		
		
		';
	}
	break;
}

echo '		

		</div>

		<hr />


	<div id="sidebar-main" class="secondary">

		<div id="search" class="widget module module1 sb-search alt">
			<h4>Search</h4>
				<form method="get" id="searchform" action="http://a2h.uni.cc/blog/wordpress/">
					<div>
						Searching doesn\'t work yet D=<br />
						<input type="text" value="" name="s" id="s" />
						<input type="submit" id="searchsubmit" value="Search" />
					</div>
				</form><br /><br />
		</div>
			
		<div id="tags" class="widget module module2 sb-tags">
			<h4>Tags</h4>
				<ul>
					';
					$resultone = mysql_query("SELECT * FROM ".$prefix."tags");
					while($rowone = mysql_fetch_array($resultone))
					{
						echo '<li><a href="?action=viewtag&amp;id='.$rowone['tagid'].'">'.$rowone['tagname'].'</a></li>';
					}
					
				echo '
				</ul>
		</div>
	</div>
';
template_page_footer();

function template_page_header() {
	global $blogwtitle,$blogftitle,$blogstitle,$currentpage;
	?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
		<head>
			<title><?=$blogwtitle?></title>
			<link rel="stylesheet" href="style.css" type="text/css" />
			<style type="text/css">
				header h1 a, #header .description {	color: #HEADER_TEXTCOLOR; }
			</style>
<?=template_famfamfam_icons_init()?>
		</head>
		
		<body class="wordpress k2 h11 home columns-two lang-en" >
			<a class="skiplink" href="#startcontent" accesskey="2">Skip to content</a>
			<div id="page">
				<div id="header">
					<h1><a href="index.php"><?=$blogftitle?></sub></a></h1>
					
					<div class="description">
						<?=($blogstitle=="default"?"It's simple. It's lightweight. It's blawggin ur blawgs since ".rand(1800,2000).".":$blogstitle)?>
						
					</div>

					<ul class="menu">
						<li class="<?=($currentpage=="home"?'current_page_item':'page_item page-item-1')?>">
							<a href="index.php" title="Home">Home</a>
						</li>
						<li class="<?=($currentpage=="admin"?'current_page_item':'page_item page-item-2')?>">
							<a href="?action=login" title="Site Admin">Site Admin</a>
						</li>
					</ul>
				</div>
				
				<hr />
				
				<div class="content">
					<div id="primary">

						<div class="navigation">
							<div class="right"></div>
							<div class="clear"></div>
						</div>
	<?php
}

function template_page_footer() {
	?>
				<hr />
				<div id="sidebar-alt" class="secondary"></div>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div>

		<hr />
		
		<div id="footer">
			<p class="footerpoweredby">Powered by BLAWGGER<sub>pre-alpha</sub> by <a href="http://a2h.uni.cc/">a2h</a></p>
			<p class="footerfeedlinks"><a href="http://getk2.com/">K2 theme</a> (somewhat) ported from WordPress</p>
		</div>

		</body>
	</html>
	<?php
}

function template_incorrect_login() {
		echo '
		<div id="post-1" class="post">
			<h3 class="entry-title">Login</h3>
			<span style="color:red;">Sorry, but the username/password you have entered is incorrect.</span><br />';
			template_admin_back(false);
			echo '
		</div>
		';
}

function template_admin_back($inadmincp=true) {
	if ($inadmincp==true) {
		echo '
		<form action="?action=admin" method="post">
			<input type="hidden" name="uname" value="'.base64_encode($_POST["uname"]).'" />
			<input type="hidden" name="upass" value="'.base64_encode($_POST["upass"]).'" />
			<input type="submit" value="Go back" />
		</form>';
	}
	else {
		echo '
		<form action="?action=login" method="post">
			<input type="submit" value="Go back" />
		</form>';
	}
}

function template_famfamfam_icons_init() {
return "
			<script language='JavaScript' type='text/javascript'>
				<!--
				function icon_time(){
					var str='';
					str+='<span style=\'font-famiy:Lucida Sans Unicode; font-size:1px; line-height:1em; text-decoration:none;\'><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EEE8E0;\'>#<\/span><span style=\'color:#D4BF9E;\'>#<\/span><span style=\'color:#D0B780;\'>#<\/span><span style=\'color:#D0B87C;\'>#<\/span><span style=\'color:#CDB47B;\'>#<\/span><span style=\'color:#C9AF7C;\'>#<\/span><span style=\'color:#CEBA9B;\'>#<\/span><span style=\'color:#EDE8E1;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#DBCDB6;\'>#<\/span><span style=\'color:#D3BA7A;\'>#<\/span><span style=\'color:#E3D9C8;\'>#<\/span><span style=\'color:#EAE7DD;\'>#<\/span><span style=\'color:#F1F1EE;\'>#<\/span><span style=\'color:#F0F0EC;\'>#<\/span><span style=\'color:#E4E0D2;\'>#<\/span><span style=\'color:#D2C3A7;\'>#<\/span><span style=\'color:#BA9F6C;\'>#<\/span><span style=\'color:#D4C8B5;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#DBCDB8;\'>#<\/span><span style=\'color:#DCCC96;\'>#<\/span><span style=\'color:#EEEBE1;\'>#<\/span><span style=\'color:#D9E1EE;\'>#<\/span><span style=\'color:#ABBDDF;\'>#<\/span><span style=\'color:#95ACD5;\'>#<\/span><span style=\'color:#91A9D4;\'>#<\/span><span style=\'color:#A2B6DC;\'>#<\/span><span style=\'color:#CEDAE8;\'>#<\/span><span style=\'color:#DFD9C5;\'>#<\/span><span style=\'color:#B59A67;\'>#<\/span><span style=\'color:#D2C7B6;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EEE9E3;\'>#<\/span><span style=\'color:#CDB375;\'>#<\/span><span style=\'color:#ECE9DF;\'>#<\/span><span style=\'color:#C1CFE6;\'>#<\/span><span style=\'color:#ADBEDF;\'>#<\/span><span style=\'color:#DCE3F1;\'>#<\/span><span style=\'color:#ECF1F3;\'>#<\/span><span style=\'color:#EBF1F4;\'>#<\/span><span style=\'color:#D9E2F1;\'>#<\/span><span style=\'color:#A2B9DC;\'>#<\/span><span style=\'color:#AEC0DE;\'>#<\/span><span style=\'color:#D8CFB6;\'>#<\/span><span style=\'color:#A6865D;\'>#<\/span><span style=\'color:#EBE7E2;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#CFBA9C;\'>#<\/span><span style=\'color:#DBCFB6;\'>#<\/span><span style=\'color:#D7E0ED;\'>#<\/span><span style=\'color:#A9BCDE;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EEF0F0;\'>#<\/span><span style=\'color:#DAE5E7;\'>#<\/span><span style=\'color:#F7FFFF;\'>#<\/span><span style=\'color:#F7FFFF;\'>#<\/span><span style=\'color:#F3FEFF;\'>#<\/span><span style=\'color:#97B3DC;\'>#<\/span><span style=\'color:#C3D1E1;\'>#<\/span><span style=\'color:#BAA372;\'>#<\/span><span style=\'color:#BCAA93;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#C3A979;\'>#<\/span><span style=\'color:#E6E1D3;\'>#<\/span><span style=\'color:#A3B8DB;\'>#<\/span><span style=\'color:#D6E3F1;\'>#<\/span><span style=\'color:#F5FBFE;\'>#<\/span><span style=\'color:#F3F5F5;\'>#<\/span><span style=\'color:#949D9E;\'>#<\/span><span style=\'color:#E9F0F0;\'>#<\/span><span style=\'color:#F2F8F8;\'>#<\/span><span style=\'color:#ACB8BD;\'>#<\/span><span style=\'color:#C1DAF0;\'>#<\/span><span style=\'color:#8AA6D1;\'>#<\/span><span style=\'color:#D3CAA8;\'>#<\/span><span style=\'color:#A68A67;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#BEA26F;\'>#<\/span><span style=\'color:#EEECE4;\'>#<\/span><span style=\'color:#89A4D1;\'>#<\/span><span style=\'color:#E9F6FA;\'>#<\/span><span style=\'color:#EEF8FD;\'>#<\/span><span style=\'color:#F9FFFF;\'>#<\/span><span style=\'color:#787F80;\'>#<\/span><span style=\'color:#A3ADB0;\'>#<\/span><span style=\'color:#767E80;\'>#<\/span><span style=\'color:#B9C5C9;\'>#<\/span><span style=\'color:#D3F0FA;\'>#<\/span><span style=\'color:#7194C9;\'>#<\/span><span style=\'color:#E2DFC9;\'>#<\/span><span style=\'color:#A07E59;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#B99C6A;\'>#<\/span><span style=\'color:#ECEADD;\'>#<\/span><span style=\'color:#809ECF;\'>#<\/span><span style=\'color:#E2F3FA;\'>#<\/span><span style=\'color:#E9F6FD;\'>#<\/span><span style=\'color:#E3F0F2;\'>#<\/span><span style=\'color:#838B8C;\'>#<\/span><span style=\'color:#767E80;\'>#<\/span><span style=\'color:#C1CFD2;\'>#<\/span><span style=\'color:#EBFBFF;\'>#<\/span><span style=\'color:#CCECFA;\'>#<\/span><span style=\'color:#6C8FC7;\'>#<\/span><span style=\'color:#E1DDC0;\'>#<\/span><span style=\'color:#9F7C58;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#B69B71;\'>#<\/span><span style=\'color:#DDD3B6;\'>#<\/span><span style=\'color:#8FA9D1;\'>#<\/span><span style=\'color:#C0DBF0;\'>#<\/span><span style=\'color:#E6F7FF;\'>#<\/span><span style=\'color:#E3F2FA;\'>#<\/span><span style=\'color:#B5BFC4;\'>#<\/span><span style=\'color:#DEEDF1;\'>#<\/span><span style=\'color:#E8FCFF;\'>#<\/span><span style=\'color:#DFF5FF;\'>#<\/span><span style=\'color:#AED4EF;\'>#<\/span><span style=\'color:#7A9AC9;\'>#<\/span><span style=\'color:#D0C191;\'>#<\/span><span style=\'color:#A08362;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#C2B199;\'>#<\/span><span style=\'color:#BFA877;\'>#<\/span><span style=\'color:#C5D1DA;\'>#<\/span><span style=\'color:#87A9D9;\'>#<\/span><span style=\'color:#EBFEFF;\'>#<\/span><span style=\'color:#EEFAFF;\'>#<\/span><span style=\'color:#F2FDFF;\'>#<\/span><span style=\'color:#F2FEFF;\'>#<\/span><span style=\'color:#EFFCFF;\'>#<\/span><span style=\'color:#EBFDFF;\'>#<\/span><span style=\'color:#79A2D9;\'>#<\/span><span style=\'color:#B8C5CB;\'>#<\/span><span style=\'color:#B09357;\'>#<\/span><span style=\'color:#B4A18C;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#ECE8E3;\'>#<\/span><span style=\'color:#A4855B;\'>#<\/span><span style=\'color:#D8CCA1;\'>#<\/span><span style=\'color:#A4B6CD;\'>#<\/span><span style=\'color:#88A9D8;\'>#<\/span><span style=\'color:#CFDFEF;\'>#<\/span><span style=\'color:#F3F6FA;\'>#<\/span><span style=\'color:#F3F5FA;\'>#<\/span><span style=\'color:#D1DFEF;\'>#<\/span><span style=\'color:#84A6D7;\'>#<\/span><span style=\'color:#97ABC2;\'>#<\/span><span style=\'color:#CEBC81;\'>#<\/span><span style=\'color:#967451;\'>#<\/span><span style=\'color:#E8E3DE;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#CFC2B3;\'>#<\/span><span style=\'color:#A58754;\'>#<\/span><span style=\'color:#D6C895;\'>#<\/span><span style=\'color:#BECACC;\'>#<\/span><span style=\'color:#859EC8;\'>#<\/span><span style=\'color:#7591C4;\'>#<\/span><span style=\'color:#728FC3;\'>#<\/span><span style=\'color:#7F99C3;\'>#<\/span><span style=\'color:#B8C3C2;\'>#<\/span><span style=\'color:#CDBC7C;\'>#<\/span><span style=\'color:#977646;\'>#<\/span><span style=\'color:#C5B9AB;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#CBBDAE;\'>#<\/span><span style=\'color:#9D7D57;\'>#<\/span><span style=\'color:#B09659;\'>#<\/span><span style=\'color:#CEBC84;\'>#<\/span><span style=\'color:#DED6A3;\'>#<\/span><span style=\'color:#DED59F;\'>#<\/span><span style=\'color:#CBB87A;\'>#<\/span><span style=\'color:#AA8B4E;\'>#<\/span><span style=\'color:#977753;\'>#<\/span><span style=\'color:#C4B8A9;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#E8E3DD;\'>#<\/span><span style=\'color:#B5A38D;\'>#<\/span><span style=\'color:#9E8161;\'>#<\/span><span style=\'color:#997752;\'>#<\/span><span style=\'color:#997752;\'>#<\/span><span style=\'color:#9E8161;\'>#<\/span><span style=\'color:#B4A18B;\'>#<\/span><span style=\'color:#E7E2DC;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><\/span>';
					document.write(str);
				}
				
				function icon_comment(){
					var str='';
					str+='<span style=\'font-famiy:Lucida Sans Unicode; font-size:1px; line-height:1em; text-decoration:none;\'><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#F3F6F9;\'>#<\/span><span style=\'color:#91B0D1;\'>#<\/span><span style=\'color:#5A88B8;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#84A6CB;\'>#<\/span><span style=\'color:#E7EEF4;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#8AAACD;\'>#<\/span><span style=\'color:#A8C0DA;\'>#<\/span><span style=\'color:#FBFCFD;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#B3C9DF;\'>#<\/span><span style=\'color:#6E96C1;\'>#<\/span><span style=\'color:#FBFCFD;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#F7F9FB;\'>#<\/span><span style=\'color:#5887B7;\'>#<\/span><span style=\'color:#FDFEFE;\'>#<\/span><span style=\'color:#F0F6FE;\'>#<\/span><span style=\'color:#E9F2FE;\'>#<\/span><span style=\'color:#E6F1FE;\'>#<\/span><span style=\'color:#E4EFFE;\'>#<\/span><span style=\'color:#E1EEFE;\'>#<\/span><span style=\'color:#DEECFE;\'>#<\/span><span style=\'color:#DBEAFD;\'>#<\/span><span style=\'color:#DCEAFD;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#7A9FC7;\'>#<\/span><span style=\'color:#DBE5EF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EBF0F6;\'>#<\/span><span style=\'color:#6B94BF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#E8F1FE;\'>#<\/span><span style=\'color:#E6F0FE;\'>#<\/span><span style=\'color:#E3EFFE;\'>#<\/span><span style=\'color:#E0EDFE;\'>#<\/span><span style=\'color:#DDECFE;\'>#<\/span><span style=\'color:#DBEAFD;\'>#<\/span><span style=\'color:#D7E8FD;\'>#<\/span><span style=\'color:#D5E6FD;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#88A9CD;\'>#<\/span><span style=\'color:#CDDBEA;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EBF0F6;\'>#<\/span><span style=\'color:#6B94BF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#E5F0FE;\'>#<\/span><span style=\'color:#E2EEFE;\'>#<\/span><span style=\'color:#E0EDFE;\'>#<\/span><span style=\'color:#DDEBFE;\'>#<\/span><span style=\'color:#DAE9FD;\'>#<\/span><span style=\'color:#D7E8FD;\'>#<\/span><span style=\'color:#D4E6FD;\'>#<\/span><span style=\'color:#D1E4FD;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#88A9CD;\'>#<\/span><span style=\'color:#CDDBEA;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#F7F9FB;\'>#<\/span><span style=\'color:#5887B7;\'>#<\/span><span style=\'color:#FDFEFE;\'>#<\/span><span style=\'color:#E9F2FE;\'>#<\/span><span style=\'color:#DFECFE;\'>#<\/span><span style=\'color:#DCEBFD;\'>#<\/span><span style=\'color:#D9E9FD;\'>#<\/span><span style=\'color:#D6E7FD;\'>#<\/span><span style=\'color:#D3E6FD;\'>#<\/span><span style=\'color:#D0E4FD;\'>#<\/span><span style=\'color:#D1E4FC;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#7CA1C8;\'>#<\/span><span style=\'color:#D9E4EF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#8AAACD;\'>#<\/span><span style=\'color:#A8C0DA;\'>#<\/span><span style=\'color:#FDFEFE;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#E2EEFE;\'>#<\/span><span style=\'color:#D0E3FD;\'>#<\/span><span style=\'color:#E9F2FE;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#B3C9DF;\'>#<\/span><span style=\'color:#6E96C1;\'>#<\/span><span style=\'color:#F9FAFC;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#F3F6F9;\'>#<\/span><span style=\'color:#91B0D1;\'>#<\/span><span style=\'color:#5887B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#5786B7;\'>#<\/span><span style=\'color:#9CB7D5;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#EFF3F8;\'>#<\/span><span style=\'color:#9CB7D5;\'>#<\/span><span style=\'color:#739AC3;\'>#<\/span><span style=\'color:#E7EEF4;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#6D96C0;\'>#<\/span><span style=\'color:#E7EEF5;\'>#<\/span><span style=\'color:#9CB7D5;\'>#<\/span><span style=\'color:#5C89B9;\'>#<\/span><span style=\'color:#ACC3DC;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#A1BBD7;\'>#<\/span><span style=\'color:#98B5D4;\'>#<\/span><span style=\'color:#5E8BBA;\'>#<\/span><span style=\'color:#B3C9DF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#E8EFF5;\'>#<\/span><span style=\'color:#6C95C0;\'>#<\/span><span style=\'color:#BCCFE3;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><span style=\'color:#FFFFFF;\'>#<\/span><br \/><\/span>';
					document.write(str);
				}
				//-->
			</script>
";
}
?>